12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378 |
- <template>
- <div>
- <!-- 页面头部 -->
- <HomePageHead></HomePageHead>
- <!-- 页面导航 -->
- <HomePageNavigation></HomePageNavigation>
- <!-- 二级标题-->
- <HomeSecondaryHeading :titleName="routeName" :titleData="pageCategory"></HomeSecondaryHeading>
- <!-- {{ name }} -->
- <!-- 第一层 -->
- <div class="farmingPartOne">
- <div class="inner">
- <div class="innerLeft" v-if="pageData.length >= 1">
- <!-- 标题部分 -->
- <div class="title">
- <h3>
- {{ pageData[0].title }}
- <span>
- <NuxtLink
- :to="{ path: `/newsList/${pageData[0].cid}`, query: { catid: pageData[0].cid, name: pageData[0].title } }"
- target="_blank">查看更多</NuxtLink>
- </span>
- </h3>
- </div>
- <div class="leftTop">
- <div class="leftTopPhoto left">
- <!-- PartTwoPhoto -->
- <!--当pageData[0].data[0]存在的时候才渲染,如果直接渲染会导致页面找不到属性-->
- <img :src="pageData[0].data[0].imgurl" v-if="pageData[0].data[0]">
- <span v-if="pageData[0].data[0]">{{ pageData[0].data[0].title }}</span>
- <!-- <img :src="pageData[2].data[0].imgurl">
- <span></span> -->
- </div>
- <ul class="left">
- <li v-for="item in pageData[0].data">
- <em></em>
- <!-- <NuxtLink :to="`/newsDetail/${item.id}`" target="_blank" >{{item.title}}</NuxtLink> -->
- <span>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank">{{ item.title }}</NuxtLink>
- </span>
- </li>
- </ul>
- </div>
- <ul class="leftBottom">
- <li v-for="item in pageData[0].data2">
- <img :src="item.imgurl">
- <p>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank">{{ item.title }}</NuxtLink>
- </p>
- </li>
- </ul>
- </div>
- <div class="innerRight" v-if="pageData.length >= 2">
- <!-- 标题部分 -->
- <div class="title">
- <h3>
- {{ pageData[1].title }}
- <span>
- <NuxtLink
- :to="{ path: `/newsList/${pageData[1].cid}`, query: { catid: pageData[1].cid, name: pageData[1].title } }"
- target="_blank">查看更多</NuxtLink>
- </span>
- <!-- <span>查看更多</span> -->
- </h3>
- </div>
- <!-- 列表 -->
- <ul class="rightList">
- <li v-for="item in pageData[1].data">
- <img class="left" :src="item.imgurl">
- <p class="left">
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank">
- {{ item.title }}
- </NuxtLink>
- </p>
- </li>
- </ul>
- </div>
- </div>
- </div>
- <!-- 三农资讯logo -->
- <HomeSannongzixun></HomeSannongzixun>
- <!-- 第二层 -->
- <div class="farmingPartTwo">
- <div class="inner">
- <div class="farmer" v-if="pageData.length >= 3">
- <!-- 标题部分 -->
- <div class="title">
- <h3>
- {{ pageData[2].title }}
- <!-- <span>查看更多</span> -->
- <span>
- <NuxtLink
- :to="{ path: `/newsList/${pageData[2].cid}`, query: { catid: pageData[2].cid, name: pageData[2].title } }"
- target="_blank">查看更多</NuxtLink>
- </span>
- </h3>
- </div>
- <div class="PartTwoPhoto" v-if="pageData[2].data[0]">
- <img :src="pageData[2].data[0].imgurl">
- <span>{{ pageData[2].data[0].title }}</span>
- </div>
- <ul class="PartTwoList">
- <li v-for="item in pageData[2].data">
- <em></em>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank">{{ item.title }}</NuxtLink>
- </li>
- </ul>
- </div>
- <div class="farmer" v-if="pageData.length >= 4">
- <!-- 标题部分 -->
- <div class="title">
- <h3>
- {{ pageData[3].title }}
- <!-- <span>查看更多</span> -->
- <span>
- <NuxtLink
- :to="{ path: `/newsList/${pageData[3].cid}`, query: { catid: pageData[3].cid, name: pageData[3].title } }"
- target="_blank">查看更多</NuxtLink>
- </span>
- </h3>
- </div>
- <div class="PartTwoPhoto" v-if="pageData[3].data[0]">
- <img :src="pageData[3].data[0].imgurl">
- <span>{{ pageData[3].data[0].title }}</span>
- </div>
- <ul class="PartTwoList">
- <li v-for="item in pageData[3].data">
- <em></em>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank">{{ item.title }}</NuxtLink>
- </li>
- </ul>
- </div>
- <div class="farmer" v-if="pageData.length >= 5">
- <!-- 标题部分 -->
- <div class="title">
- <h3>
- {{ pageData[4].title }}
- <span>
- <NuxtLink
- :to="{ path: `/newsList/${pageData[4].cid}`, query: { catid: pageData[4].cid, name: pageData[4].title } }"
- target="_blank">查看更多</NuxtLink>
- </span>
- </h3>
- </div>
- <div class="PartTwoPhoto" v-if="pageData[4].data[0]">
- <img :src="pageData[4].data[0].imgurl">
- <span>{{ pageData[4].data[0].title }}</span>
- </div>
- <ul class="PartTwoList">
- <li v-for="item in pageData[4].data">
- <em></em>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank">{{ item.title }}</NuxtLink>
- </li>
- </ul>
- </div>
- </div>
- </div>
- <!-- 三农资讯logo -->
- <HomeSannongzixun></HomeSannongzixun>
- <!-- 第三层 -->
- <div class="zixuntuijian">
- <div class="inner">
- <div class="innerLeft">
- <div class="zixunTop">
- <div class="zixunLeft">
- <!-- 标题部分 -->
- <div class="title">
- <h3>
- {{ pageData[5].title }}
- <span>
- <NuxtLink
- :to="{ path: `/newsList/${pageData[5].cid}`, query: { catid: pageData[5].cid, name: pageData[5].title } }"
- target="_blank">查看更多</NuxtLink>
- </span>
- </h3>
- </div>
- <!-- 图片和文字列表 160 -->
- <ul class="photo_text">
- <li v-for="(item, index) in pageData[5].data">
- <article v-if="index == 0">
- <img :src="item.imgurl" alt="">
- <div>
- <h5>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank">{{ item.title }}</NuxtLink>
- </h5>
- <p>
- <span>{{ item.author }}</span>
- <span>{{ item.created_at }}</span>
- </p>
- </div>
- </article>
- <article v-else>
- <em></em>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank">{{ item.title }}</NuxtLink>
- </article>
- </li>
- </ul>
- </div>
- <div class="zixunRight">
- <!-- 标题部分 -->
- <div class="title">
- <h3>
- {{ pageData[6].title }}
- <span>
- <NuxtLink
- :to="{ path: `/newsList/${pageData[6].cid}`, query: { catid: pageData[6].cid, name: pageData[6].title } }"
- target="_blank">查看更多</NuxtLink>
- </span>
- </h3>
- </div>
- <div class="towPic">
- <div v-for="(item, index) in pageData[6].data" class="picBox">
- <div v-if="index <= 1">
- <img :src="item.imgurl">
- </div>
- </div>
- </div>
- <!-- 图片和文字列表 -->
- <ul class="photo_text">
- <li v-for="(item, index) in pageData[6].data">
- <article v-if="index > 1">
- <em></em>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank">{{ item.title }}</NuxtLink>
- </article>
- </li>
- </ul>
- </div>
- </div>
- <div class="zixunBottom">
- <img class="left" :src="pageData[7].data[0].imgurl"
- v-if="pageData[7].data[0] && hoverStatus == 0">
- <img class="left" :src="pageData[7].data[1].imgurl"
- v-if="pageData[7].data[0] && hoverStatus == 1">
- <img class="left" :src="pageData[7].data[2].imgurl"
- v-if="pageData[7].data[0] && hoverStatus == 2">
- <ul class="leftList left">
- <li v-for="(item, index) in pageData[7].data" @mouseleave="qhPic(index)">
- <h4>
- <em></em>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank">{{ item.title }}</NuxtLink>
- </h4>
- <p>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank">{{ item.title }}</NuxtLink>
- </p>
- </li>
- </ul>
- </div>
- </div>
- <div class="innerRight">
- <!-- 标题部分 -->
- <div class="title">
- <h3>
- {{ pageData[8].title }}
- <span>
- <NuxtLink
- :to="{ path: `/newsList/${pageData[8].cid}`, query: { catid: pageData[8].cid, name: pageData[8].title } }"
- target="_blank">查看更多</NuxtLink>
- </span>
- </h3>
- </div>
- <ul class="information">
- <li v-for="item in pageData[8].data">
- <img :src="item.imgurl">
- <div class="text">
- <h5>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank">{{ item.title }}</NuxtLink>
- </h5>
- <p>{{ item.introduce }}</p>
- </div>
- </li>
- </ul>
- </div>
- </div>
- </div>
- <!-- 十强称号logo -->
- <HomeTopTen></HomeTopTen>
- <!-- 第四层 -->
- <div class="farming">
- <div class="inner">
- <div class="innerLeft">
- <div class="farmer">
- <h3>
- {{ pageData[9].title }}
- <span>
- <NuxtLink
- :to="{ path: `/newsList/${pageData[9].cid}`, query: { catid: pageData[9].cid, name: pageData[9].title } }"
- target="_blank">查看更多</NuxtLink>
- </span>
- </h3>
- <ul>
- <li v-for="item in pageData[9].data">
- <em></em>
- <span>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank">{{ item.title }}</NuxtLink>
- </span>
- </li>
- </ul>
- </div>
- <div class="farmer">
- <h3>
- {{ pageData[10].title }}
- <span>
- <NuxtLink
- :to="{ path: `/newsList/${pageData[10].cid}`, query: { catid: pageData[10].cid, name: pageData[10].title } }"
- target="_blank">查看更多</NuxtLink>
- </span>
- </h3>
- <ul>
- <li v-for="item in pageData[10].data">
- <em></em>
- <span>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank">{{ item.title }}</NuxtLink>
- </span>
- </li>
- </ul>
- </div>
- </div>
- <div class="innerRight">
- <!-- 标题部分 -->
- <h3>
- {{ pageData[11].title }}
- <span>
- <NuxtLink
- :to="{ path: `/newsList/${pageData[11].cid}`, query: { catid: pageData[11].cid, name: pageData[11].title } }"
- target="_blank">查看更多</NuxtLink>
- </span>
- </h3>
- <!-- 轮播图 -->
- <div class="banner">
- <HomeSmallSwiper :swiperData="pageData[11].data"></HomeSmallSwiper>
- </div>
- <!-- 轮播图下小图列表 及内容列表 -->
- <div class="banner_b_img">
- <div class="photo">
- <article v-for="(item, index) in pageData[11].data2">
- <div class="photoL" v-if="index == 0">
- <img :src="item.imgurl">
- <span>{{ item.title }}</span>
- </div>
- <div class="photoL" v-if="index == 1">
- <img :src="item.imgurl">
- <span>{{ item.title }}</span>
- </div>
- </article>
- </div>
- </div>
- <div class="banner_text_list">
- <ul>
- <li v-for="item in pageData[11].data3">
- <em></em>
- <span>{{ item.title }}</span>
- </li>
- </ul>
- </div>
- </div>
- </div>
- </div>
- <!-- 十强称号logo -->
- <HomeTopTenTitle></HomeTopTenTitle>
- <!-- 第五层 -->
- <div class="scienceEducation">
- <div class="inner">
- <!-- 左侧 -->
- <div class="innerLeft">
- <!-- <HomeSlider ></HomeSlider> -->
- <div class="slider">
- <!-- 标题部分 -->
- <div class="scienceTitle">
- <h5>{{ pageData[12].title }}</h5>
- <p class="title">
- <span v-if="pageData[12]" @click="qhtabs(1)">
- <b v-if="showTabs == 1" class="active">{{ pageData[12].title1 }}</b>
- <b v-else class="noSelect">{{ pageData[12].title1 }}</b>
- </span>
- <span v-if="pageData[12]" @click="qhtabs(2)">
- <b v-if="showTabs == 2" class="active">{{ pageData[12].title2 }}</b>
- <b v-else class="noSelect">{{ pageData[12].title2 }}</b>
- </span>
- <span v-if="pageData[12]" @click="qhtabs(3)">
- <b v-if="showTabs == 3" class="active">{{ pageData[12].title3 }}</b>
- <b v-else class="noSelect">{{ pageData[12].title3 }}</b>
- </span>
- <span v-if="pageData[12]" @click="qhtabs(4)">
- <b v-if="showTabs == 4" class="active">{{ pageData[12].title4 }}</b>
- <b v-else class="noSelect">{{ pageData[12].title4 }}</b>
- </span>
- </p>
- </div>
- <!-- 标题下内容列表 -->
- <div class="box">
- <div class="scienceListBox">
- <ul class="scienceList" v-if="showTabs == 1">
- <li v-for="item in pageData[12].data1">
- <!-- <img :src="item.imgurl"> -->
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank"><img :src="item.imgurl"></NuxtLink>
- <p>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank">{{ item.title }}</NuxtLink>
- </p>
- </li>
- </ul>
- <ul class="scienceList" v-if="showTabs == 2">
- <li v-for="item in pageData[12].data2">
- <!-- <img :src="item.imgurl"> -->
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank"><img :src="item.imgurl"></NuxtLink>
- <p>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank">{{ item.title }}</NuxtLink>
- </p>
- </li>
- </ul>
- <ul class="scienceList" v-if="showTabs == 3">
- <li v-for="item in pageData[12].data3">
- <!-- <img :src="item.imgurl"> -->
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank"><img :src="item.imgurl"></NuxtLink>
- <p>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank">{{ item.title }}</NuxtLink>
- </p>
- </li>
- </ul>
- <ul class="scienceList" v-if="showTabs == 4">
- <li v-for="item in pageData[12].data4">
- <img :src="item.imgurl">
- <p>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank">{{ item.title }}</NuxtLink>
- </p>
- </li>
- </ul>
- </div>
- </div>
- </div>
- </div>
- <!-- 右侧 -->
- <div class="innerRight">
- <!-- 标题部分 -->
- <h3>
- {{ pageData[13].title }}
- <span>
- <NuxtLink
- :to="{ path: `/newsList/${pageData[13].cid}`, query: { catid: pageData[13].cid, name: pageData[13].title } }"
- target="_blank">查看更多</NuxtLink>
- </span>
- </h3>
- <ul class="sannongList">
- <li v-for="item in pageData[13].data3">
- <em></em>
- <span>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank">{{ item.title }}</NuxtLink>
- </span>
- </li>
- </ul>
- <!-- 轮播图 -->
- <div class="banner">
- <HomeSmallSwiper :swiperData="pageData[13].data"></HomeSmallSwiper>
- </div>
- <!-- 轮播图下小图列表 及内容列表 -->
- <div class="banner_b_img">
- <div class="photo">
- <article v-for="(item, index) in pageData[13].data2">
- <div class="photoL" v-if="index == 0">
- <img :src="item.imgurl">
- <span>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank">{{ item.title }}</NuxtLink>
- </span>
- </div>
- <div class="photoL" v-if="index == 1">
- <img :src="item.imgurl">
- <span>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank">{{ item.title }}</NuxtLink>
- </span>
- </div>
- </article>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!-- 页脚部分 -->
- <HomeFoot></HomeFoot>
- </div>
- </template>
- <script setup>
- //获取生命周期
- import { onMounted } from 'vue';
- //获得跳转过来的id
- const route = useRoute();
- const routeId = route.params.id; //获得该页面的id
- const routeName = route.query.name; //获得该页面的名称
- //获取行政部门和地区
- const cityid = route.query.cityid;
- const depId = route.query.department_id;
- //获得axios
- const nuxtApp = useNuxtApp();
- const axios = nuxtApp.$axios;
- // 定义响应式数据
- const seoData = ref({
- title: '默认标题',
- description: '默认描述',
- keywords: '默认关键词',
- image: 'https://example.com/default-image.jpg'
- });
- const hoverStatus = ref(1)
- const qhPic = function (num) {
- console.log(num)
- hoverStatus.value = num;
- }
- // 在 onMounted 钩子中获取数据
- onMounted(async () => {
- try {
- const response = await axios.get("`/web/getWebsiteCategoryHead?catid=${routeId}`");
- const data = response.data.website_head; // 假设接口返回的数据在 data 字段中
- console.log(seoData.value.title)
- // 更新 seoData
- seoData.value = {
- title: data.seo_title,
- description: data.seo_description,
- keywords: data.seo_keywords,
- image: data.seo_image
- };
- console.log(seoData.value.title)
- } catch (error) {
- console.error('获取 SEO 数据失败:', error);
- // 设置默认值
- seoData.value = {
- title: '默认标题',
- description: '默认描述',
- keywords: '默认关键词',
- image: 'https://example.com/default-image.jpg'
- };
- }
- });
- // 监听 seoData 的变化,动态设置 SEO 字段
- watch(seoData, (newVal) => {
- if (newVal.title) { // 确保 title 有值
- useSeoMeta({
- title: newVal.title, // 使用动态值
- description: newVal.description,
- ogTitle: newVal.title,
- ogDescription: newVal.description,
- ogImage: newVal.image,
- twitterTitle: newVal.title,
- twitterDescription: newVal.description,
- twitterImage: newVal.image,
- keywords: newVal.keywords
- });
- }
- }, { immediate: true });
- //该页面上所有的导航池 转为动态数据
- const pageCategory = ref([]);
- //该页面上需要渲染的所有数据
- const pageData = ref([
- { id: 0, data: [], data2: [], title: "", cid: "" },
- { id: 1, data: [], title: "", cid: "" },
- { id: 2, data: [], title: "", cid: "" },
- { id: 3, data: [], title: "", cid: "" },
- { id: 4, data: [], title: "", cid: "" },
- { id: 5, data: [], title: "", cid: "" },
- { id: 6, data: [], title: "", cid: "" },
- { id: 7, data: [], title: "", cid: "" },
- { id: 8, data: [], title: "", cid: "" },
- { id: 9, data: [], title: "", cid: "" },
- { id: 10, data: [], title: "", cid: "" },
- { id: 10, data: [], title: "", cid: "" },
- {
- id: 11,
- title: "",
- data: [],
- data1: [],
- data2: [],
- data3: [],
- data4: [],
- category_id1: "",
- category_id2: "",
- category_id3: "",
- category_id4: "",
- title1: "",
- title2: "",
- title3: "",
- title4: "",
- cid: ""
- },
- { id: 12, data1: [], data2: [], data3: [], cid: "" },
- ])
- //第一种情况 直接获得二级导航
- //第一步:获得该分类下的所有二级导航
- const newCategory = useState("getWebsiteModelCategory", () => ''); //动态数据
- //placeid 固定为1
- //pid 由上个页面带过来的1级导航id
- //num 获得多少个2级导航 取决你的页面显示 上面有几个你就请求几个
- const getWebsiteModelCategory = async () => {
- try {
- const response = await axios.get(`/web/getWebsiteModelCategory?placeid=${1}&pid=${routeId}&num=${14}`);
- pageCategory.value = response.data;
- //给与板块标题
- for (let index in response.data) {
- pageData.value[index].title = response.data[index].name
- pageData.value[index].cid = response.data[index].category_id
- }
- console.log(pageData.value)
- console.log(pageCategory.value)
- renderPage();
- } catch (error) {
- console.error(error);
- }
- }
- //第二种情况 用户搜索的二级导航
- const searchCategory = useState("selectWebsiteCategory", () => ''); //动态数据
- //placeid 固定为1
- //pid 由上个页面带过来的1级导航id
- //num 获得多少个2级导航 取决你的页面显示 上面有几个你就请求几个
- const selectWebsiteCategory = async () => {
- try {
- const response = await axios.get(`/web/selectWebsiteCategory?pid=${routeId}&cityid=${cityid}&department_id=${depId}`);
- pageCategory.value = response.data;
- //给与板块标题
- for (let index in response.data) {
- pageData.value[index].title = response.data[index].name
- }
- console.log(pageData.value)
- console.log(pageCategory.value)
- renderPage2();
- } catch (error) {
- console.error(error);
- }
- }
- //第二步:获得对应分类下的数据
- const renderPage = function () {
- console.log("当前获取到:" + pageCategory.value.length + "个导航")
- //循环pageCategory.value.length的次数执行getWebsiteArticlesList
- for (let i = 0; i <= pageCategory.value.length - 1; i++) {
- getWebsiteArticlesList(pageCategory.value[i].category_id, i)
- }
- }
- //第二步:获得搜索对应分类下的数据 - 因为字段名字不一样,这里做了一下区分
- const renderPage2 = function () {
- console.log("当前获取到:" + pageCategory.value.length + "个导航")
- //循环pageCategory.value.length的次数执行getWebsiteArticlesList
- for (let i = 0; i <= pageCategory.value.length - 1; i++) {
- getWebsiteArticlesList(pageCategory.value[i].id, i)
- }
- }
- //第三步循环获取数据
- const getWebsiteArticlesList = async (name, listType) => {
- //第一层
- //板块1 图文
- if (listType == 0) {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${8}`);
- pageData.value[0].data = response.data
- const response2 = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${4}&placeid=${9}`);
- pageData.value[0].data2 = response2.data
- }
- //板块2 图文
- if (listType == 1) {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${5}`);
- pageData.value[1].data = response.data;
- }
- //第二层
- //板块3 图文
- if (listType == 2) {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${6}`);
- pageData.value[2].data = response.data;
- }
- //板块4 图文
- if (listType == 3) {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${6}`);
- pageData.value[3].data = response.data;
- }
- //板块5 图文
- if (listType == 4) {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${6}`);
- pageData.value[4].data = response.data;
- }
- //第三层
- //板块6 图文
- if (listType == 5) {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${4}`);
- pageData.value[5].data = response.data;
- }
- //板块7 图文
- if (listType == 6) {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${5}`);
- pageData.value[6].data = response.data;
- }
- //板块8 图文
- if (listType == 7) {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${3}`);
- pageData.value[7].data = response.data;
- }
- //板块9 图文
- if (listType == 8) {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${4}`);
- pageData.value[8].data = response.data;
- }
- //第四层
- //板块10 文字
- if (listType == 9) {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${1}&pagesize=${10}`);
- pageData.value[9].data = response.data;
- }
- //板块11 文字
- if (listType == 10) {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${1}&pagesize=${10}`);
- pageData.value[10].data = response.data;
- }
- //板块12 轮播图 图文 文字
- if (listType == 11) {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${2}&pagesize=${4}`);
- pageData.value[11].data = response.data;
- const response2 = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${2}`);
- pageData.value[11].data2 = response2.data;
- const response3 = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${1}&pagesize=${5}`);
- pageData.value[11].data3 = response3.data;
- }
- //第五层
- //板块12 多级栏目 判断下面有没有子级 如果有每个取出来 6条图文
- if (listType == 12) {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${10}`);
- pageData.value[12].data = response.data;
- console.log("第一步获取父级id")
- console.log(pageCategory.value[12].children_count)
- console.log(pageCategory.value[12].category_id)
- //判断一下里面有没有子导航
- if (pageCategory.value[12].children_count != 0) {
- //开始请求子导航
- const response = await axios.get(`/web/getWebsiteModelCategory?placeid=${1}&pid=${pageCategory.value[12].category_id}&num=${100}`);
- console.log("第二步获取子级数量")
- console.log(response.data.length)
- //获得标题
- //判断里面有几个
- for (let i = 1; i <= response.data.length; i++) {
- if (i == 1) {
- pageData.value[12].title1 = response.data[0].name
- pageData.value[12].category_id1 = response.data[0].category_id
- }
- if (i == 2) {
- pageData.value[12].title2 = response.data[1].name
- pageData.value[12].category_id2 = response.data[1].category_id
- }
- if (i == 3) {
- pageData.value[12].title3 = response.data[2].name
- pageData.value[12].category_id3 = response.data[2].category_id
- }
- if (i == 4) {
- pageData.value[12].title4 = response.data[3].name
- pageData.value[12].category_id4 = response.data[3].category_id
- }
- }
- //获得内容
- //第三步:有几个就循环几次
- for (let i = 1; i <= pageCategory.value[12].children_count; i++) {
- if (i == 1) {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[12].category_id1}&level=${3}&pagesize=${6}`);
- pageData.value[12].data1 = response.data
- }
- if (i == 2) {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[12].category_id2}&level=${3}&pagesize=${6}`);
- pageData.value[12].data2 = response.data
- }
- if (i == 3) {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[12].category_id3}&level=${3}&pagesize=${6}`);
- pageData.value[12].data3 = response.data
- }
- if (i == 4) {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[12].category_id4}&level=${3}&pagesize=${6}`);
- pageData.value[12].data4 = response.data
- }
- }
- }
- }
- //板块13 轮播图 图文 文字
- if (listType == 13) {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${2}&pagesize=${4}`);
- pageData.value[13].data = response.data;
- const response2 = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${2}`);
- pageData.value[13].data2 = response2.data;
- const response3 = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${1}&pagesize=${5}`);
- pageData.value[13].data3 = response3.data;
- }
- }
- let scienceTitleList = [
- {
- id: 1,
- title: "农产畅销"
- },
- {
- id: 2,
- title: "农业在线"
- },
- {
- id: 3,
- title: "农产行情"
- },
- {
- id: 4,
- title: "名优特产"
- }
- ]
- //鼠标移入标题时,下方内容会发生变化
- let changeUl = (index) => {
- // console.log(index);
- if (process.browser) {
- let scienceListBox = document.querySelector('.scienceListBox');
- let titleList = document.querySelectorAll('.title>span>a')
- for (let i = 0; i < titleList.length; i++) {
- titleList[i].className = ''
- }
- titleList[index].setAttribute('class', 'current')
- if (index == 0) {
- scienceListBox.style.left = 0
- } else if (index == 1) {
- scienceListBox.style.left = "-790px"
- } else if (index == 2) {
- scienceListBox.style.left = "-1580px"
- } else if (index == 3) {
- scienceListBox.style.left = "-2370px"
- }
- }
- }
- //显示哪个tabs
- let showTabs = ref(1)
- let qhtabs = function (number) {
- console.log(number)
- showTabs.value = number
- }
- //挂载成功钩子函数
- onMounted(() => {
- //判断一下应该走搜索还是直接走二级分类
- console.log(111111)
- console.log(cityid)
- console.log(cityid != undefined)
- console.log(depId != undefined)
- if (cityid != undefined || depId != undefined) {
- console.log(7777777777)
- console.log(cityid)
- console.log(depId)
- //获得用户搜索的导航
- selectWebsiteCategory()
- } else {
- console.log(888888888)
- //直接获得所有二级导航
- getWebsiteModelCategory()
- }
- })
- </script>
- <style lang="less" scoped>
- a {
- color: #333333;
- }
- //农民工part1
- .farmingPartOne {
- width: 100%;
- height: 600px;
- .inner {
- height: 600px;
- .innerLeft {
- height: 600px;
- .leftTop {
- margin-top: 20px;
- height: 320px;
- .leftTopPhoto {
- width: 387px;
- height: 320px;
- position: relative;
- img {
- width: 387px;
- height: 320px;
- }
- span {
- display: inline-block;
- width: 387px;
- height: 50px;
- background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1));
- color: #FFFFFF;
- position: absolute;
- bottom: 0;
- left: 0;
- font-family: Source Han Sans, Source Han Sans;
- font-weight: 500;
- font-size: 20px;
- line-height: 23px;
- padding-top: 11px;
- padding-left: 13px;
- box-sizing: border-box;
- white-space: nowrap;
- /* 禁止换行 */
- overflow: hidden;
- /* 隐藏超出部分 */
- text-overflow: ellipsis;
- /* 超出部分显示省略号 */
- }
- }
- >ul.left {
- margin-left: 25px;
- width: 362px;
- height: 320px;
- margin-top: 5px;
- >li {
- em {
- display: inline-block;
- width: 8px;
- height: 8px;
- border-radius: 8px;
- background-color: #d9d9d9;
- margin-right: 8px;
- vertical-align: middle;
- }
- width: 362px;
- height: 22px;
- font-family: PingFang SC,
- PingFang SC;
- font-weight: 500;
- font-size: 18px;
- color: #333333;
- line-height: 22px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- margin-bottom: 19px;
- white-space: nowrap;
- /* 禁止换行 */
- overflow: hidden;
- /* 隐藏超出部分 */
- text-overflow: ellipsis;
- /* 超出部分显示省略号 */
- }
- >li:hover {
- a {
- color: #088f04;
- }
- color: #088f04;
- }
- >li:hover>em {
- background-color: #088f04;
- }
- }
- }
- .leftBottom {
- height: 202px;
- margin-top: 21px;
- >li {
- float: left;
- width: 185px;
- height: 202px;
- margin-right: 10px;
- >img {
- width: 185px;
- height: 139px;
- }
- >p {
- width: 185px;
- height: 58px;
- padding: 8px 5px 12px;
- box-sizing: border-box;
- background-color: #f5f5f5;
- font-family: PingFang SC, PingFang SC;
- font-weight: 500;
- font-size: 18px;
- color: #333333;
- line-height: 24px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- /* 限制显示的行数 */
- overflow: hidden;
- text-overflow: ellipsis;
- }
- }
- >li:hover {
- a {
- color: #088f04;
- }
- }
- >li:last-child {
- margin: 0;
- }
- }
- }
- .innerRight {
- .rightList {
- height: 540px;
- margin-top: 20px;
- >li {
- height: 100px;
- margin-bottom: 10px;
- >img {
- width: 150px;
- height: 100px;
- }
- >p {
- width: 219px;
- height: 100px;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 4;
- overflow: hidden;
- text-overflow: ellipsis;
- word-break: break-all;
- padding-left: 12px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 16px;
- color: #333333;
- line-height: 24px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- }
- >p:hover {
- box-shadow: 0 0 16px 1px rgba(0, 0, 0, 0.1);
- a {
- color: #088f04;
- }
- }
- }
- }
- }
- }
- }
- //农民工part2
- .farmingPartTwo {
- width: 100%;
- height: 600px;
- .inner {
- width: 1200px;
- height: 600px;
- >.farmer {
- float: left;
- width: 380px;
- height: 600px;
- margin-right: 29px;
- // 农民工part2标题
- >.title {
- width: 380px;
- }
- >.title>h3 {
- height: 36px;
- font-family: Source Han Sans, Source Han Sans;
- font-weight: bold;
- font-size: 24px;
- color: #000000;
- line-height: 28px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- border-bottom: 1px solid #139602;
- }
- >.title>h3>span>a {
- float: right;
- width: 56px;
- height: 20px;
- line-height: 24px;
- font-weight: 400;
- font-size: 14px;
- color: #999999;
- font-style: normal;
- text-transform: none;
- }
- // 农民工part2图片
- .PartTwoPhoto {
- width: 380px;
- height: 280px;
- margin-top: 20px;
- position: relative;
- img {
- width: 380px;
- height: 280px;
- }
- >span {
- display: inline-block;
- width: 380px;
- height: 50px;
- background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1));
- color: #FFFFFF;
- position: absolute;
- bottom: 0;
- left: 0;
- font-family: Source Han Sans, Source Han Sans;
- font-weight: 500;
- font-size: 20px;
- line-height: 23px;
- padding-top: 11px;
- padding-left: 13px;
- box-sizing: border-box;
- white-space: nowrap;
- /* 禁止换行 */
- overflow: hidden;
- /* 隐藏超出部分 */
- text-overflow: ellipsis;
- /* 超出部分显示省略号 */
- }
- }
- //农民工part2文字列表
- .PartTwoList {
- width: 380px;
- height: 263px;
- background-color: #fff;
- box-shadow: 0px 4px 30px 1px rgba(174, 174, 174, 0.25);
- padding-top: 20px;
- box-sizing: border-box;
- >li {
- width: 380px;
- height: 25px;
- line-height: 25px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 500;
- font-size: 18px;
- color: #333333;
- margin-bottom: 16px;
- white-space: nowrap;
- /* 禁止换行 */
- overflow: hidden;
- /* 隐藏超出部分 */
- text-overflow: ellipsis;
- /* 超出部分显示省略号 */
- >em {
- display: inline-block;
- width: 8px;
- height: 8px;
- background-color: #d9d9d9;
- border-radius: 8px;
- margin-left: 19px;
- margin-right: 10px;
- }
- }
- >li:hover {
- color: #139602;
- a {
- color: #088f04;
- }
- }
- >li:hover>em {
- background-color: #139602;
- }
- }
- }
- >.farmer:last-child {
- margin-right: 0;
- }
- }
- }
- //资讯推荐
- .zixuntuijian {
- width: 100%;
- height: 600px;
- .innerLeft {
- // 左侧的上半部分
- .zixunTop {
- height: 286px;
- .zixunLeft,
- .zixunRight {
- float: left;
- width: 380px;
- height: 286px;
- .towPic {
- display: flex;
- width: 380px;
- height: 116px;
- margin-top: 20px;
- .picBox {
- width: 50%;
- text-align: center;
- }
- .picBox:nth-child(3),
- .picBox:nth-child(4),
- .picBox:nth-child(5) {
- display: none;
- }
- img {
- width: 190px;
- height: 120px;
- }
- .picBox:first-child {
- margin-right: 5px;
- }
- }
- // 标题部分
- >.title {
- width: 380px;
- }
- >.title>h3 {
- height: 36px;
- font-family: Source Han Sans, Source Han Sans;
- font-weight: bold;
- font-size: 24px;
- color: #000000;
- line-height: 28px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- border-bottom: 1px solid #139602;
- }
- >.title>h3>span {
- float: right;
- width: 56px;
- height: 20px;
- line-height: 24px;
- font-weight: 400;
- font-size: 14px;
- color: #999999;
- font-style: normal;
- text-transform: none;
- }
- .photo_text {
- article {
- white-space: nowrap;
- /* 禁止换行 */
- overflow: hidden;
- /* 隐藏超出部分 */
- text-overflow: ellipsis;
- /* 超出部分显示省略号 */
- li {
- white-space: nowrap;
- /* 禁止换行 */
- overflow: hidden;
- /* 隐藏超出部分 */
- text-overflow: ellipsis;
- /* 超出部分显示省略号 */
- a:hover {
- color: #088f04;
- }
- }
- li:hover {
- color: #088f04;
- a {
- color: #088f04;
- }
- }
- img {
- width: 100px;
- }
- }
- li {
- width: 380px;
- height: 25px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 500;
- font-size: 18px;
- color: #333333;
- line-height: 21px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- margin-bottom: 9px;
- em {
- display: inline-block;
- width: 8px;
- height: 8px;
- border-radius: 8px;
- margin-right: 10px;
- background-color: #d9d9d9;
- }
- }
- }
- }
- // 左侧的资讯推荐的左半部分
- .zixunLeft {
- margin-right: 30px;
- .photo_text {
- li:first-child {
- width: 380px;
- height: 120px;
- margin-top: 20px;
- margin-bottom: 16px;
- position: relative;
- img {
- float: left;
- width: 160px;
- height: 120px;
- }
- div {
- float: left;
- width: 220px;
- height: 120px;
- padding-left: 15px;
- padding-top: 6px;
- box-sizing: border-box;
- background-color: #f6f6f6;
- h5 {
- width: 200px;
- height: 54px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- font-family: Source Han Sans, Source Han Sans;
- font-weight: 500;
- font-size: 18px;
- color: #333333;
- line-height: 26px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- }
- p {
- width: 200px;
- height: 22px;
- line-height: 20px;
- position: absolute;
- bottom: 5px;
- right: 0;
- span {
- display: inline-block;
- width: 75px;
- height: 18px;
- font-family: Source Han Sans, Source Han Sans;
- font-weight: 400;
- font-size: 12px;
- color: #999999;
- text-align: left;
- line-height: 14px;
- font-style: normal;
- text-transform: none;
- }
- span:last-child {
- width: 90px;
- text-align: right;
- }
- }
- }
- }
- >li {
- width: 380px;
- height: 25px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 500;
- font-size: 18px;
- color: #333333;
- line-height: 21px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- margin-bottom: 9px;
- em {
- display: inline-block;
- width: 8px;
- height: 8px;
- border-radius: 8px;
- margin-right: 10px;
- background-color: #d9d9d9;
- }
- }
- }
- }
- // 左侧的资讯推荐的右半部分
- .zixunRight {
- width: 380px;
- height: 229px;
- .photo_text {
- margin-top: 20px;
- >li:nth-child(1) {
- display: none;
- }
- >li:nth-child(2) {
- display: none;
- }
- }
- }
- }
- //左侧的下半部分
- .zixunBottom {
- width: 790px;
- height: 280px;
- margin-top: 40px;
- img {
- width: 498px;
- height: 280px;
- }
- >.leftList {
- width: 290px;
- height: 280px;
- background-color: #f6f6f6;
- padding: 11px 26px 6px 20px;
- box-sizing: border-box;
- >li {
- width: 296px;
- height: 75px;
- color: #666666;
- font-size: 14px;
- margin-bottom: 18px;
- h4 {
- font-family: Source Han Sans, Source Han Sans;
- height: 27px;
- line-height: 21px;
- font-size: 18px;
- white-space: nowrap;
- /* 禁止换行 */
- overflow: hidden;
- /* 隐藏超出部分 */
- text-overflow: ellipsis;
- /* 超出部分显示省略号 */
- color: #333333;
- width: 280px;
- em {
- display: inline-block;
- width: 8px;
- height: 8px;
- background-color: #333333;
- border-radius: 8px;
- margin-right: 5px;
- }
- }
- p {
- width: 249px;
- height: 48px;
- line-height: 24px;
- padding-left: 14px;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- /* 限制显示的行数 */
- overflow: hidden;
- text-overflow: ellipsis;
- }
- }
- >li:hover,
- >li:hover>h4>a,
- >li:hover>p>a {
- color: #088f04;
- }
- >li:hover>h4>em {
- background-color: #088f04;
- }
- }
- }
- }
- .innerRight {
- .information {
- width: 380px;
- margin-top: 20px;
- >li {
- width: 380px;
- height: 120px;
- margin-bottom: 21px;
- img {
- float: left;
- width: 160px;
- height: 120px;
- }
- .text {
- float: left;
- width: 220px;
- height: 120px;
- padding-left: 15px;
- box-sizing: border-box;
- >h5 {
- width: 199px;
- height: 43px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- padding-top: 6px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 600;
- font-size: 18px;
- color: #333333;
- line-height: 26px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- }
- >p {
- width: 198px;
- height: 46px;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- overflow: hidden;
- text-overflow: ellipsis;
- word-break: break-all;
- margin-top: 16px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 14px;
- color: #666666;
- line-height: 24px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- }
- }
- .text:hover {
- box-shadow: 0 0 16px 1px rgba(0, 0, 0, 0.1);
- background-color: #fff;
- h5 {
- a {
- color: #088f04;
- }
- }
- p {
- color: #088f04;
- }
- }
- }
- }
- }
- }
- // 农民工
- .farming {
- width: 100%;
- height: 605px;
- // 左侧
- .innerLeft {
- width: 790px;
- height: 605px;
- margin-right: 21px;
- // background-color: #ccc;
- .farmer {
- width: 790px;
- height: 312px;
- >h3 {
- height: 36px;
- font-family: Source Han Sans, Source Han Sans;
- font-weight: bold;
- font-size: 24px;
- color: #000000;
- line-height: 28px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- border-bottom: 1px solid #139602;
- >span {
- float: right;
- width: 56px;
- height: 20px;
- line-height: 24px;
- font-weight: 400;
- font-size: 14px;
- color: #999999;
- font-style: normal;
- text-transform: none;
- }
- }
- >ul {
- margin-top: 20px;
- >li {
- float: left;
- width: 362px;
- height: 22px;
- font-weight: 500;
- font-size: 18px;
- color: #333333;
- line-height: 21px;
- text-align: left;
- margin-bottom: 29px;
- margin-right: 27px;
- white-space: nowrap;
- /* 禁止换行 */
- overflow: hidden;
- /* 隐藏超出部分 */
- text-overflow: ellipsis;
- /* 超出部分显示省略号 */
- >em {
- display: inline-block;
- width: 8px;
- height: 8px;
- background-color: #d9d9d9;
- border-radius: 4px;
- margin: 5px 8px 6px;
- vertical-align: middle;
- }
- }
- >li:hover {
- color: #139602;
- a {
- color: #139602;
- }
- }
- }
- }
- .farmerbottom {
- width: 790px;
- height: 280px;
- img {
- width: 498px;
- height: 280px;
- }
- >.leftList {
- width: 290px;
- height: 280px;
- background-color: #f6f6f6;
- padding: 11px 26px 6px 20px;
- box-sizing: border-box;
- >li {
- width: 296px;
- height: 75px;
- color: #666666;
- font-size: 14px;
- margin-bottom: 18px;
- h4 {
- font-family: Source Han Sans, Source Han Sans;
- height: 27px;
- line-height: 21px;
- font-size: 18px;
- color: #333333;
- em {
- display: inline-block;
- width: 8px;
- height: 8px;
- background-color: #333333;
- border-radius: 8px;
- }
- }
- p {
- width: 249px;
- height: 48px;
- line-height: 24px;
- padding-left: 14px;
- }
- }
- >li:hover,
- >li:hover>h4 {
- color: #088f04;
- }
- >li:hover>h4>em {
- background-color: #088f04;
- }
- }
- }
- }
- // 右侧
- .innerRight {
- width: 380px;
- height: 605px;
- // 标题部分
- >h3 {
- height: 36px;
- font-family: Source Han Sans, Source Han Sans;
- font-weight: bold;
- font-size: 24px;
- color: #000000;
- line-height: 28px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- border-bottom: 1px solid #139602;
- >span {
- float: right;
- width: 56px;
- height: 20px;
- line-height: 24px;
- font-weight: 400;
- font-size: 14px;
- color: #999999;
- font-style: normal;
- text-transform: none;
- }
- }
- // 轮播图
- .banner {
- width: 380px;
- height: 214px;
- margin-top: 20px;
- }
- .banner_b_img {
- // 图片部分
- .photo {
- height: 104px;
- margin-top: 10px;
- display: flex;
- }
- .photoL,
- .photoR {
- float: left;
- width: 185px;
- height: 104px;
- position: relative;
- img {
- width: 185px;
- height: 104px;
- }
- span {
- position: absolute;
- top: 0;
- left: 0;
- display: inline-block;
- padding-left: 7px;
- box-sizing: border-box;
- width: 185px;
- height: 22px;
- background-color: rgba(0, 0, 0, 0.5);
- font-weight: 500px;
- font-size: 14px;
- color: #FFFFFF;
- line-height: 22px;
- white-space: nowrap;
- /* 禁止换行 */
- overflow: hidden;
- /* 隐藏超出部分 */
- text-overflow: ellipsis;
- /* 超出部分显示省略号 */
- }
- }
- .photoL {
- margin-right: 10px;
- }
- }
- .banner_text_list {
- ul {
- width: 380px;
- height: 186px;
- margin-top: 30px;
- >li {
- height: 22px;
- padding-bottom: 16px;
- white-space: nowrap;
- /* 禁止换行 */
- overflow: hidden;
- /* 隐藏超出部分 */
- text-overflow: ellipsis;
- /* 超出部分显示省略号 */
- >strong {
- display: inline-block;
- width: 24px;
- height: 24px;
- line-height: 24px;
- background-color: #cecece;
- padding-left: 6px;
- box-sizing: border-box;
- font-family: Source Han Sans, Source Han Sans;
- font-weight: 500;
- font-size: 18px;
- color: #FFFFFF;
- font-style: normal;
- text-transform: none;
- }
- >em {
- display: inline-block;
- width: 6px;
- height: 6px;
- border-radius: 10px;
- border: 2px solid #8CBA86;
- margin-right: 10px;
- }
- >span {
- width: 380px;
- height: 22px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 500;
- font-size: 18px;
- color: #333333;
- line-height: 21px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- }
- >span:hover {
- color: #139609;
- }
- }
- }
- }
- }
- }
- //三农科教
- .scienceEducation {
- height: 600px;
- margin-bottom: 76px;
- .innerLeft,
- .innerRight {
- float: left;
- }
- // 左侧
- .innerLeft {
- width: 790px;
- height: 616px;
- margin-right: 21px;
- }
- // 右侧
- .innerRight {
- width: 380px;
- height: 600px;
- // 标题部分
- >h3 {
- height: 36px;
- font-family: Source Han Sans, Source Han Sans;
- font-weight: bold;
- font-size: 24px;
- color: #000000;
- line-height: 28px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- border-bottom: 1px solid #139602;
- >span {
- float: right;
- width: 56px;
- height: 20px;
- line-height: 24px;
- font-weight: 400;
- font-size: 14px;
- color: #999999;
- font-style: normal;
- text-transform: none;
- }
- }
- ul.sannongList {
- width: 380px;
- height: 186px;
- >li {
- height: 22px;
- padding-top: 16px;
- white-space: nowrap;
- /* 禁止换行 */
- overflow: hidden;
- /* 隐藏超出部分 */
- text-overflow: ellipsis;
- /* 超出部分显示省略号 */
- >strong {
- display: inline-block;
- width: 24px;
- height: 24px;
- line-height: 24px;
- background-color: #cecece;
- padding-left: 6px;
- box-sizing: border-box;
- font-family: Source Han Sans, Source Han Sans;
- font-weight: 500;
- font-size: 18px;
- color: #FFFFFF;
- font-style: normal;
- text-transform: none;
- }
- >em {
- display: inline-block;
- width: 6px;
- height: 6px;
- border-radius: 10px;
- border: 2px solid #8CBA86;
- }
- >span {
- width: 380px;
- height: 22px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 500;
- font-size: 18px;
- color: #333333;
- line-height: 21px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- padding-left: 9px;
- }
- >span:hover {
- color: #139609;
- a {
- color: #088f04;
- }
- }
- }
- }
- // 轮播图
- .banner {
- width: 380px;
- height: 214px;
- margin-top: 45px;
- }
- .banner_b_img {
- // 图片部分
- .photo {
- height: 104px;
- margin-top: 10px;
- display: flex;
- }
- .photoL,
- .photoR {
- float: left;
- width: 185px;
- height: 104px;
- position: relative;
- img {
- width: 185px;
- height: 104px;
- }
- span {
- position: absolute;
- top: 0;
- left: 0;
- display: inline-block;
- padding-left: 7px;
- box-sizing: border-box;
- width: 185px;
- height: 22px;
- background-color: rgba(0, 0, 0, 0.5);
- font-weight: 500px;
- font-size: 14px;
- color: #FFFFFF;
- line-height: 22px;
- white-space: nowrap;
- /* 禁止换行 */
- overflow: hidden;
- /* 隐藏超出部分 */
- text-overflow: ellipsis;
- /* 超出部分显示省略号 */
- a {
- color: #fff;
- }
- }
- }
- .photoL {
- margin-right: 10px;
- }
- }
- }
- }
- // 标题
- .scienceTitle {
- height: 37px;
- h5 {
- float: left;
- width: 96px;
- height: 34px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 600;
- font-size: 24px;
- color: #000000;
- line-height: 28px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- margin-right: 20px;
- }
- >p {
- float: left;
- height: 37px;
- line-height: 30px;
- >span {
- display: inline-block;
- //height: 20px;
- line-height: 20px;
- text-align: center;
- margin: 4px 0px 3px;
- padding: 0 20px;
- //border-right: 1px solid #ccc;
- font-weight: 500;
- font-size: 20px;
- cursor: pointer;
- padding-bottom: 11px;
- // >a {
- // display: inline-block;
- // padding-bottom: 11px;
- // font-family: PingFang SC, PingFang SC;
- // font-weight: 500;
- // font-size: 20px;
- // color: #666666;
- // line-height: 20px;
- // font-style: normal;
- // text-transform: none;
- // box-sizing: border-box;
- // }
- .current {
- color: #139602;
- border-bottom: 1px solid #139602;
- }
- }
- >span:nth-child(4) {
- border-right: none;
- }
- >span:hover>a {
- color: #139602;
- border-bottom: 1px solid #139602;
- }
- }
- }
- .box {
- width: 790px;
- height: 570px;
- position: relative;
- overflow: hidden;
- }
- .fade-in {
- animation: fadeIn 1s ease-in-out;
- }
- .fade-enter-from,
- .fade-leave-to {
- opacity: 0;
- }
- .fade-enter-to,
- .fade-leave-from {
- opacity: 1;
- }
- .fade-enter-active,
- .fade-leave-active {
- transition: opacity 1s ease;
- }
- .scienceListBox {
- width: 3160px;
- height: 570px;
- position: absolute;
- top: 0;
- left: 0;
- transition: all 3s linear 0;
- }
- // 标题下列表
- .scienceList {
- width: 790px;
- height: 570px;
- float: left;
- margin-top: 17px;
- >li {
- width: 250px;
- height: 276px;
- float: left;
- margin-right: 20px;
- position: relative;
- img {
- width: 250px;
- height: 220px;
- }
- >p {
- height: 50px;
- width: 248px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 600;
- font-size: 18px;
- color: #333333;
- line-height: 24px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- /* 限制显示的行数 */
- overflow: hidden;
- text-overflow: ellipsis;
- }
- // >p:hover {
- // color: #139602;
- // }
- }
- >li:hover {
- color: #088f04;
- >p:hover {
- a {
- color: #088f04;
- }
- // color: #139602;
- }
- }
- >li:nth-child(3),
- >li:nth-child(6) {
- margin-right: 0;
- }
- >li::before {
- content: "";
- display: inline-block;
- width: 40px;
- height: 20px;
- position: absolute;
- top: 0;
- right: 0;
- background-image: url("../../static/images/Component 209.png");
- }
- }
- .active {
- border-bottom: 3px solid #139602;
- height: 36px;
- display: inline-block;
- }
- .noSelect {
- border-bottom: 3px solid #fff;
- height: 36px;
- display: inline-block;
- }
- </style>
|